1. Field of the Invention
The present invention relates to a fuzzy rule-based system used in various controllers.
2. Description of the Related Art
FIGS. 1A to 1D show examples of general fuzzy logic. FIGS. 1A to 1C show membership functions of IF parts (or IF logics) and THEN parts (or THEN logics) of Fuzzy Rules 1 to 3, and define the relationship between input variables X and Y, and an output variable C.
More specifically, FIG. 1A represents Fuzzy Rule 1 "if X=BIG and Y=BIG then C=SMALL (If an input variable X is large, and an input variable Y is large, then set an output variable C to be small)". With reference to the values of the input variables and the membership functions of the IF part, a membership value or grade is calculated based on an input value. If the IF part includes a plurality of input variables, the minimum grade is obtained by minimum processing (to be referred to as "MIN processing" hereinafter). Using the obtained min value, the membership function of the THEN part is modified (to cut a peak). Since Rule 1 includes two IF part membership functions "X=BIG" and "Y=BIG", the grade of the variable Y is selected by the MIN processing, and the membership function .alpha. of the THEN part is modified according to the selected grade, thereby obtaining a membership function .alpha.' indicated by hatching.
FIG. 1B represents Fuzzy Rule 2 "if X=SMALL and Y=MEDIUM then C=MEDIUM (If an input variable X is small and an input variable Y is medium, then set an output variable C to be medium)". FIG. 1C represents Fuzzy Rule 3 "if X=SMALL and Y=SMALL then C=BIG (If an input variable X is small and an input variable Y is small, then set an output variable C to be big)". Since each of Rules 2 and 3 includes two IF part membership functions, a membership function .beta.' or .gamma.' indicated by hatching in FIG. 1B or 1C is obtained by MIN processing.
The membership functions of the THEN parts obtained by the MIN processing according to Fuzzy Rules 1 to 3 are combined to obtain a combined inference result, and the combined inference result is utilized in various types of control. The membership functions of the THEN parts are combined, as shown in, e.g., FIG. 1D. More specifically, the maximum values of the modified membership functions .alpha.', .beta.', and 65 ' of the THEN parts of Rules 1 to 3 are extracted to form a new membership function.
The combined inference result is defuzzified to obtain a conclusive value. For example, the value of the center of gravity G of the combined new membership function is calculated, and the calculated center of gravity value G serves as an output.
Conventionally, there was no general-purpose LSI chip for fuzzy inference. Therefore, when an arbitrary system is controlled using the Fuzzy inference, the arithmetic operation for the fuzzy inference is executed by software. However, the arithmetic operation consumes much time. In recent years, various LSI chips for the fuzzy inference have been developed, and the ratio of hardware in a fuzzy logic system is increased accordingly. When the hardware ratio increases, fuzzy rules are partially fixed, and flexibility of fuzzy inference is lost. For this reason, in general, a fuzzy inference LSI chip incorporates a special-purpose memory storing fuzzy rules to assure the flexibility of fuzzy inference. In a relatively small-scale fuzzy inference system used in, e.g., home electrical appliances, membership functions are stored in advance in a special-purpose external memory in the form of a table, and the table is accessed to generate membership functions.
In order to improve accuracy of fuzzy inference, the number of fuzzy rules, the resolution of membership functions, and the number of I/O variables must be increased. However, when the number of fuzzy rules, the resolution of membership functions, and the number of I/O variables are increased, the capacity of a memory, and the number of accesses to the memory are increased. For this reason, the fuzzy operation processing speed is decreased, the memory capacity is increased, and the number of I/O gates of the memory is increased.
When all components such as a circuit for generating membership functions of IF and THEN parts, a processor for processing the membership functions of IF and THEN parts, a defuzzify circuit, and fuzzy rules are realized by hardware, the circuit scale can be reduced, and the computation speed can be increased. However, the number of fuzzy rules which can be set is limited. Furthermore, since fuzzy operation algorithm depends on hardware, only a limited processing method can be executed, thus resulting in a low degree of freedom. In particular, as for the defuzzification, algorithms such as a height method, an area method, a center of gravity method, and the like are known. These algorithms have unique features, i.e., respectively place importance on different points such as speed, accuracy, and the like. Thus, different defuzzification algorithms must be employed according to objects to be controlled. For this reason, when an inference circuit and a defuzzify circuit are arranged in a hardware arrangement together with other circuits, the application of the system is limited.
The hardware fuzzy rule-based system can only output a defuzzified output, e.g., the above-mentioned center of gravity value, and no intermediate data until the output is obtained can be derived outside the system. For this reason, it is difficult to test, evaluate, and debug chips. Similarly, when a fuzzy inference chip is tested by a CPU, the load on the CPU is heavy.
A conventional membership function generator and an IF part processor have a large circuit scale, and are not suitable for a one-chip configuration.